package org.example.biz;

import java.util.HashMap;
import java.util.Map;

public class StageFactory {

    private Map<String, AbstractFactory> stageMap = new HashMap<>();

    // 还是有过度依赖
    public StageFactory() {
        stageMap.put("11", new SubFunc31());
        stageMap.put("22", new SubFcunc32());
    }

    public AbstractFactory createStage(String stageType) {
        return stageMap.get(stageType);
    }

    @Override
    public String toString() {
        return "StageFactory []";
    }
}
